package com.chunuo.mvc.controller;

import com.chunuo.configuration.annotation.ControllerAdvice;
import com.chunuo.configuration.annotation.ExceptionHandler;
import com.chunuo.mvc.common.R;

/**
 * 类的作用
 *
 * @author liujiamiao
 * @email 2544296058@qq.com
 * @date 2020-12-24 15:58
 */
@ControllerAdvice
public class XxxException {

    @ExceptionHandler(Exception.class)
    public R error(Exception e){
        e.printStackTrace();
        return R.error().message(e.getMessage());
    }
}
